package com.xioyi.news.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.xioyi.news.dao.impl.ArticleDao;
import com.xioyi.news.domain.Article;
import com.xioyi.news.service.IArticleService;

public class ArticleService implements IArticleService {
	private ArticleDao articleDao;
	@Override
	public void createArticle(Article article) throws SQLException {
		articleDao.saveObject(article);
	}
	
	/**
	 * @return the articleDao
	 */
	public ArticleDao getArticleDao() {
		return articleDao;
	}
	/**
	 * @param articleDao the articleDao to set
	 */
	public void setArticleDao(ArticleDao articleDao) {
		this.articleDao = articleDao;
	}

	@Override
	public List<Article> getArticelListByCatalog(Integer article) {
		return articleDao.getArticlesByCatalog(article);
	}
	
}
